home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 624 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.2 KB

  1. Path: rcp6.elan.af.mil!rscernix!root
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: gnu.misc.discuss,comp.std.c
  4. Subject: Re: Coding Standards are ignorant
  5. Date: 19 Mar 96 20:52:26 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <root.827268746@rscernix>
  8. References: <4gum82$14v4@info4.rus.uni-stuttgart.de> <KANZE.96Mar8125719@gabi.gabi-soft.fr> <danpop.826543744@rscernix> <4i829o$qbh@usenet.pa.dec.com> <4ikptb$er8@golem.phys.ndsu.NoDak.edu>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11.  
  12. In <4ikptb$er8@golem.phys.ndsu.NoDak.edu> mooney@golem.phys.ndsu.NoDak.edu (Timothy Mooney) writes:
  13.  
  14. >In article <4i829o$qbh@usenet.pa.dec.com>,
  15. >Norman Diamond <diamond@tbj.dec.com> wrote:
  16. >>In article <danpop.826543744@rscernix>, danpop@mail.cern.ch (Dan Pop) writes:
  17. >>>In <KANZE.96Mar8125719@gabi.gabi-soft.fr> kanze@gabi-soft.fr (J. Kanze) writes:
  18. >>>Does any of your compilers have a -iso option?  
  19. >>
  20. >>At least one compiler has a -std option.  That's the good news.  The bad news
  21. >>is that it's documented (if an online manual page is a document :-)  thus:
  22. >>     -std Produce errors for constructions that are not compatible with the
  23. >>          ANSI standard.
  24. >
  25. >DEC's cc for Digital Unix 3.2 has a -std option, and the man page does
  26. >mention the ISO standard.
  27.  
  28. Does it?  Not as far as I can see on my Digital Unix 3.2 box:
  29.  
  30.   -std[n]
  31.       Have the compiler produce warnings for language constructs that are not
  32.       standard in the language. The default is -std0.
  33.  
  34.       The -std flag enforces the ANSI C standard with popular extensions.
  35.       and causes the macro __STDC__=0 to be passed to the preprocessor.
  36.  
  37.       The value n can be one of the following:
  38.  
  39.       0   Enforce the K & R standard with some ANSI extensions, and causes
  40.           the __STDC__ macro to be undefined.
  41.  
  42.       1   Enforce the ANSI C standard and causes the macro __STDC__=1 to be
  43.           passed to the preprocessor.  Note that the -std1 flag also affects
  44.           linker defined symbols.  See the ld(1) reference page for more
  45.           information.
  46.  
  47. Dan
  48. --
  49. Dan Pop
  50. CERN, CN Division
  51. Email: danpop@mail.cern.ch 
  52. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  53.